package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.InformationEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * ComputerName:LAPTOP-I6GKDIFQ
 * Author:admin
 * Date: 2019-06-10
 * Time: 09:13:05
 * Comment:查询扩展工具类
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "消息表扩展")
public class InformationParam extends BeanCovert<InformationEntity> {

    @ApiModelProperty("消息主键")
    @NotNull(message = "消息主键不能为空!", groups = {Update.class})
    private Long id;

    @ApiModelProperty("消息类别")
    @Size(max = 6, message = "消息类别长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
    private String inforType;


    @ApiModelProperty("消息状态")
    @Size(max = 6, message = "消息状态长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
    private String inforState;



    @ApiModelProperty("发送时间")
    private Date sendTime;

    @ApiModelProperty("发送对象")
    private Long sendObjId;

    @ApiModelProperty("接受对象")
    private Long receiverObjId;

    @ApiModelProperty("消息标题")
    @Size(max = 50, message = "消息标题长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
    private String inforTitle;

    @ApiModelProperty("消息内容")
    @Size(max = 4000, message = "消息内容长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
    private String inforData;

    @ApiModelProperty("消息URL")
    @Size(max = 1024, message = "消息URL长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
    private String srcUrl;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("目的地")
    @Size(max = 2, message = "目的地长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
    private String destination;

    @ApiModelProperty("消息扩展内容(josn格式)")
    @Size(max = 4000, message = "消息扩展内容(josn格式)长度必须在{min}和{max}之间", groups = {Add.class, Update.class})
    private String extContent;

    @ApiModelProperty("目的地")
    private String destinationName;

    public interface Add {

    }

    public interface Update {

    }

}
